package com.weifangfirecontrolformal.weifangfirecontrolformal.web.service.internetofthings.firefightingvisualization;

import cn.hutool.json.JSONObject;
import com.weifangfirecontrolformal.weifangfirecontrolformal.common.base.BaseService;
import com.weifangfirecontrolformal.weifangfirecontrolformal.support.model.RespEntity;
import com.weifangfirecontrolformal.weifangfirecontrolformal.support.utils.requestutil.HttpRequestUtil;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

@Service
@Slf4j
public class VisAlarmInfoService extends BaseService {

	private static final Logger logger = LoggerFactory.getLogger(VisAlarmInfoService.class);

	/**
	 * 更多报警信息列表查询
	 * @param
	 * @return
	 */
	public RespEntity alarmInfoListPage(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return firefightingvisualization(jsonParam,"alarmInfoListPage","alarmInfo");

	}

	/**
	 * 字典组查询（目前用到电气火灾监测报警类型的列表查询）
	 * @param
	 * @return
	 */
	public RespEntity dictList(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return fireFightingiotJava(jsonParam,"dictList","alarmInfo");

	}

	/**
	 * 处置功能
	 * @param
	 * @return
	 */
	public RespEntity handle(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());

		return firefightingvisualization(jsonParam,"handle","alarmInfo");

	}

	/**
	 * 报警信息详情
	 * @param
	 * @return
	 */
	public RespEntity detail(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return fireFightingiotJava(jsonParam,"detail","alarmInfo");

	}

	/**
	 * 报警日志添加
	 * @param
	 * @return
	 */
	public RespEntity add(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());

		return firefightingvisualization(jsonParam,"add","alarmInfo");

	}

	/**
	 * 图片查看
	 * @param
	 * @return
	 */
	public RespEntity lookImg(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());

		return firefightingvisualization(jsonParam,"lookImg","alarmInfo");

	}

}
